
let info = document.querySelector(".info")

//获取优惠券数据
fetch("http://chst.vip:1234/api/getcoupon")
    .then(response => response.json())
    .then(res => {
        console.log(res)
        let domlis = ''
    
        res.result.forEach(item => {

            domlis += `<a href="yhjlist.html?couponid=${item.couponId}">
            <p>${item.couponTitle}</p>
        </a>`
        })
        info.innerHTML = domlis
    })